package com.server1.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Value("${server.port}")
    private String port;
    @RequestMapping("test01")
    public String test01(){
        System.out.println("========="+port);
        return port;
    }

    @RequestMapping("test06")
    public String username(String user){
        if(user.equals("1111")){
            throw new RuntimeException("==0==出错了==");
        }
        return "------------2222---------"+user;
    }
}
